package com.vegetable.modules.entity.inbound;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * <p>
 * 入库-采购收货退货明细
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="PurchaseDeliveryReturnDetail对象", description="入库-采购收货退货明细")
public class PurchaseDeliveryReturnDetail extends BaseEntity {

    @ApiModelProperty(value = "退货主表ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long returnId;

    @ApiModelProperty(value = "订单明细ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deliveryDetailId;

    @ApiModelProperty(value = "商品ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commodityId;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "规格ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long specsId;

    @ApiModelProperty(value = "规格名称")
    private String specsName;

    @ApiModelProperty(value = "原订单数量")
    private Integer originalNumber;

    @ApiModelProperty(value = "原订单重量")
    private BigDecimal originalWeight;

    @ApiModelProperty(value = "退货数量")
    private Integer returnNumber;

    @ApiModelProperty(value = "退货重量")
    private BigDecimal returnWeight;

    @ApiModelProperty(value = "单价")
    private BigDecimal unitPrice;

    @ApiModelProperty(value = "退货金额")
    private BigDecimal returnAmount;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "商品编码")
    @TableField(exist = false)
    private String commodityCode;
}